Integrand size = 35, antiderivative size = 229 \[ \int \sqrt {\cot (c+d x)} \sqrt {a+b \tan (c+d x)} (A+B \tan (c+d x)) \, dx=-\frac {\sqrt {i a-b} (i A-B) \arctan \left (\frac {\sqrt {i a-b} \sqrt {\tan (c+d x)}}{\sqrt {a+b \tan (c+d x)}}\right ) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}}{d}+\frac {2 \sqrt {b} B \text {arctanh}\left (\frac {\sqrt {b} \sqrt {\tan (c+d x)}}{\sqrt {a+b \tan (c+d x)}}\right ) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}}{d}-\frac {\sqrt {i a+b} (i A+B) \text {arctanh}\left (\frac {\sqrt {i a+b} \sqrt {\tan (c+d x)}}{\sqrt {a+b \tan (c+d x)}}\right ) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}}{d} \]
[Out]
Time = 0.85 (sec) , antiderivative size = 229, normalized size of antiderivative = 1.00, number of steps used = 13, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {4326, 3695, 3697, 3696, 95, 209, 212, 3715, 65, 223} \[ \int \sqrt {\cot (c+d x)} \sqrt {a+b \tan (c+d x)} (A+B \tan (c+d x)) \, dx=-\frac {\sqrt {-b+i a} (-B+i A) \sqrt {\tan (c+d x)} \sqrt {\cot (c+d x)} \arctan \left (\frac {\sqrt {-b+i a} \sqrt {\tan (c+d x)}}{\sqrt {a+b \tan (c+d x)}}\right )}{d}-\frac {\sqrt {b+i a} (B+i A) \sqrt {\tan (c+d x)} \sqrt {\cot (c+d x)} \text {arctanh}\left (\frac {\sqrt {b+i a} \sqrt {\tan (c+d x)}}{\sqrt {a+b \tan (c+d x)}}\right )}{d}+\frac {2 \sqrt {b} B \sqrt {\tan (c+d x)} \sqrt {\cot (c+d x)} \text {arctanh}\left (\frac {\sqrt {b} \sqrt {\tan (c+d x)}}{\sqrt {a+b \tan (c+d x)}}\right )}{d} \]
[In]
[Out]
Rule 65
Rule 95
Rule 209
Rule 212
Rule 223
Rule 3695
Rule 3696
Rule 3697
Rule 3715
Rule 4326
Rubi steps \begin{align*} \text {integral}& = \left (\sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \int \frac {\sqrt {a+b \tan (c+d x)} (A+B \tan (c+d x))}{\sqrt {\tan (c+d x)}} \, dx \\ & = \left (\sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \int \frac {a A-b B+(A b+a B) \tan (c+d x)}{\sqrt {\tan (c+d x)} \sqrt {a+b \tan (c+d x)}} \, dx+\left (b B \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \int \frac {1+\tan ^2(c+d x)}{\sqrt {\tan (c+d x)} \sqrt {a+b \tan (c+d x)}} \, dx \\ & = \frac {1}{2} \left ((a-i b) (A-i B) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \int \frac {1+i \tan (c+d x)}{\sqrt {\tan (c+d x)} \sqrt {a+b \tan (c+d x)}} \, dx+\frac {1}{2} \left ((a+i b) (A+i B) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \int \frac {1-i \tan (c+d x)}{\sqrt {\tan (c+d x)} \sqrt {a+b \tan (c+d x)}} \, dx+\frac {\left (b B \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {x} \sqrt {a+b x}} \, dx,x,\tan (c+d x)\right )}{d} \\ & = \frac {\left ((a-i b) (A-i B) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \text {Subst}\left (\int \frac {1}{(1-i x) \sqrt {x} \sqrt {a+b x}} \, dx,x,\tan (c+d x)\right )}{2 d}+\frac {\left ((a+i b) (A+i B) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \text {Subst}\left (\int \frac {1}{(1+i x) \sqrt {x} \sqrt {a+b x}} \, dx,x,\tan (c+d x)\right )}{2 d}+\frac {\left (2 b B \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {a+b x^2}} \, dx,x,\sqrt {\tan (c+d x)}\right )}{d} \\ & = \frac {\left ((a-i b) (A-i B) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \text {Subst}\left (\int \frac {1}{1-(i a+b) x^2} \, dx,x,\frac {\sqrt {\tan (c+d x)}}{\sqrt {a+b \tan (c+d x)}}\right )}{d}+\frac {\left ((a+i b) (A+i B) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \text {Subst}\left (\int \frac {1}{1-(-i a+b) x^2} \, dx,x,\frac {\sqrt {\tan (c+d x)}}{\sqrt {a+b \tan (c+d x)}}\right )}{d}+\frac {\left (2 b B \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \text {Subst}\left (\int \frac {1}{1-b x^2} \, dx,x,\frac {\sqrt {\tan (c+d x)}}{\sqrt {a+b \tan (c+d x)}}\right )}{d} \\ & = -\frac {\sqrt {i a-b} (i A-B) \arctan \left (\frac {\sqrt {i a-b} \sqrt {\tan (c+d x)}}{\sqrt {a+b \tan (c+d x)}}\right ) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}}{d}+\frac {2 \sqrt {b} B \text {arctanh}\left (\frac {\sqrt {b} \sqrt {\tan (c+d x)}}{\sqrt {a+b \tan (c+d x)}}\right ) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}}{d}-\frac {\sqrt {i a+b} (i A+B) \text {arctanh}\left (\frac {\sqrt {i a+b} \sqrt {\tan (c+d x)}}{\sqrt {a+b \tan (c+d x)}}\right ) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}}{d} \\ \end{align*}
Time = 0.86 (sec) , antiderivative size = 238, normalized size of antiderivative = 1.04 \[ \int \sqrt {\cot (c+d x)} \sqrt {a+b \tan (c+d x)} (A+B \tan (c+d x)) \, dx=\frac {\sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)} \left (\sqrt [4]{-1} \left (\sqrt {-a+i b} (i A+B) \arctan \left (\frac {\sqrt [4]{-1} \sqrt {-a+i b} \sqrt {\tan (c+d x)}}{\sqrt {a+b \tan (c+d x)}}\right )+\sqrt {a+i b} (-i A+B) \arctan \left (\frac {\sqrt [4]{-1} \sqrt {a+i b} \sqrt {\tan (c+d x)}}{\sqrt {a+b \tan (c+d x)}}\right )\right ) \sqrt {a+b \tan (c+d x)}+2 \sqrt {a} \sqrt {b} B \text {arcsinh}\left (\frac {\sqrt {b} \sqrt {\tan (c+d x)}}{\sqrt {a}}\right ) \sqrt {1+\frac {b \tan (c+d x)}{a}}\right )}{d \sqrt {a+b \tan (c+d x)}} \]
[In]
[Out]
result has leaf size over 500,000. Avoiding possible recursion issues.
Time = 1.41 (sec) , antiderivative size = 2178428, normalized size of antiderivative = 9512.79
\[\text {output too large to display}\]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 8075 vs. \(2 (178) = 356\).
Time = 2.44 (sec) , antiderivative size = 16183, normalized size of antiderivative = 70.67 \[ \int \sqrt {\cot (c+d x)} \sqrt {a+b \tan (c+d x)} (A+B \tan (c+d x)) \, dx=\text {Too large to display} \]
[In]
[Out]
\[ \int \sqrt {\cot (c+d x)} \sqrt {a+b \tan (c+d x)} (A+B \tan (c+d x)) \, dx=\int \left (A + B \tan {\left (c + d x \right )}\right ) \sqrt {a + b \tan {\left (c + d x \right )}} \sqrt {\cot {\left (c + d x \right )}}\, dx \]
[In]
[Out]
\[ \int \sqrt {\cot (c+d x)} \sqrt {a+b \tan (c+d x)} (A+B \tan (c+d x)) \, dx=\int { {\left (B \tan \left (d x + c\right ) + A\right )} \sqrt {b \tan \left (d x + c\right ) + a} \sqrt {\cot \left (d x + c\right )} \,d x } \]
[In]
[Out]
Exception generated. \[ \int \sqrt {\cot (c+d x)} \sqrt {a+b \tan (c+d x)} (A+B \tan (c+d x)) \, dx=\text {Exception raised: TypeError} \]
[In]
[Out]
Timed out. \[ \int \sqrt {\cot (c+d x)} \sqrt {a+b \tan (c+d x)} (A+B \tan (c+d x)) \, dx=\int \sqrt {\mathrm {cot}\left (c+d\,x\right )}\,\left (A+B\,\mathrm {tan}\left (c+d\,x\right )\right )\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )} \,d x \]
[In]
[Out]